using System;
using System.Reflection;
using System.IO;
using NBody;
using NBody.Analysis;
using OptionParser;

[assembly: AssemblyTitle ("NBodyHead")]
[assembly: AssemblyVersion ("1.0.*")]
[assembly: AssemblyDescription ("Read the n-body file header.")]
[assembly: AssemblyCopyright ("2005 Joseph D. MacMillan")]


public class NBodyHead
{
    public static void Main(string[] args)
    {
        InputGetOptions opts = new InputGetOptions();
        opts.ProcessArgs(args);
                        
        using (BinaryReader br = new BinaryReader(File.OpenRead(opts.InFile)))
        {
            int n = br.ReadInt32();
            double t = br.ReadDouble();
            Console.WriteLine("N-Body System:");
            Console.WriteLine("  Number of particles: {0}", n);
            Console.WriteLine("  Time of snapshot: {0:f6}", t);
        }
    }
}
